using UnityEngine;

public class FlyBubble : Obstacle
{
    // Start is called once before the first execution of Update after the MonoBehaviour is created
    public float speed;
    void Start()
    {
        
    }
    void OnTriggerEnter2D(Collider2D other)
    {
        if(other.gameObject.layer==LayerMask.NameToLayer("Bubble"))
        {
            print("掉水");
            Bubble.I.AddWater(consumeWaterAmount);
        }
    }
    // Update is called once per frame
    void Update()
    {
        base.Update();
        transform.position+=Vector3.up*speed*Time.deltaTime;
    }
}
